package com.ruoyi.job_users.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.job_users.mapper.JobUsersMapper;
import com.ruoyi.job_users.domain.JobUsers;
import com.ruoyi.job_users.service.IJobUsersService;

/**
 * 就业信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-13
 */
@Service
public class JobUsersServiceImpl implements IJobUsersService 
{
    @Autowired
    private JobUsersMapper jobUsersMapper;

    /**
     * 查询就业信息
     * 
     * @param jobUserId 就业信息主键
     * @return 就业信息
     */
    @Override
    public JobUsers selectJobUsersByJobUserId(Long jobUserId)
    {
        return jobUsersMapper.selectJobUsersByJobUserId(jobUserId);
    }

    /**
     * 查询就业信息列表
     * 
     * @param jobUsers 就业信息
     * @return 就业信息
     */
    @Override
    @DataScope(deptAlias = "d",userAlias = "d")
    public List<JobUsers> selectJobUsersList(JobUsers jobUsers)
    {
        return jobUsersMapper.selectJobUsersList(jobUsers);
    }

    /**
     * 新增就业信息
     * 
     * @param jobUsers 就业信息
     * @return 结果
     */
    @Override
    public int insertJobUsers(JobUsers jobUsers)
    {
        return jobUsersMapper.insertJobUsers(jobUsers);
    }

    /**
     * 修改就业信息
     * 
     * @param jobUsers 就业信息
     * @return 结果
     */
    @Override
    public int updateJobUsers(JobUsers jobUsers)
    {
        jobUsers.setUpdateTime(DateUtils.getNowDate());
        return jobUsersMapper.updateJobUsers(jobUsers);
    }

    /**
     * 批量删除就业信息
     * 
     * @param jobUserIds 需要删除的就业信息主键
     * @return 结果
     */
    @Override
    public int deleteJobUsersByJobUserIds(Long[] jobUserIds)
    {
        return jobUsersMapper.deleteJobUsersByJobUserIds(jobUserIds);
    }

    /**
     * 删除就业信息信息
     * 
     * @param jobUserId 就业信息主键
     * @return 结果
     */
    @Override
    public int deleteJobUsersByJobUserId(Long jobUserId)
    {
        return jobUsersMapper.deleteJobUsersByJobUserId(jobUserId);
    }
}
